﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once
#include "GcmpPickInterface.h"
#include "IObject.h"

namespace gcmp
{
    class IGraphicsNodeReference;
    class ElementId;
    class IPickTarget;

    /// \brief 拾取过滤器,用于过滤不希望被拾取到的元素或图形节点
    class GCMP_PICK_INTERFACE_EXPORT IPickFilter : public IObject
    {
    public:
        /// \brief 设置是否允许拾取此元素的图形表达及其子节点
        /// \param elementId 元素Id
        /// \return 成功返回true，失败返回false
        virtual bool AllowElement(const ElementId& elementId) const = 0;

        /// \brief 设置是否允许拾取该图形节点
        /// \param graphicsNodeReference 图形节点的引用
        /// \return 成功返回true，失败返回false
        virtual bool AllowGraphicsNode(const IGraphicsNodeReference& graphicsNodeReference) const = 0;

        /// \brief 设置拾取目标
        /// \param pickTarget 拾取目标
        /// \return 成功返回true，失败返回false
        virtual bool SetPickTargetOption(IPickTarget* pickTarget) = 0;
    };
}



